import sys, os

sys.path.append("../..")

from src.vobjects.item import Item

class PluginPlaylist:

    def __init__(self, title, videos: list=list(), url: str=""):
        self.title = title
        self.videos = videos
        self.url = url

    def to_item(self):
        status = {
            "url" : self.url
        }

        item = Item(
            title=self.title,
            fstr=f"{len(self.videos)} series",
            parent=self,
            status=status
        )

        return item
